- Posted on
- Featured Image
The comm command in Linux is an essential utility that compares two sorted files line by line, making it a valuable tool for many administrators and developers who handle text data. Typically, most tutorials cover its default usage with standard delimiters, but today, we'll dive into handling custom delimiters, which can significantly enhance this tool's flexibility. Q1: What is the comm command used for? A1: The comm command is used to compare two sorted files. It outputs three columns by default: unique to file1, unique to file2, and common lines. Q2: How does the comm handle file comparison by default? A2: By default, comm expects that the files are sorted using the same order. If they are not sorted, the results are unpredictable.